<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>C++ Web Framework: /home/herik/CPPWebFramework/CPPWebFramework/cwf/httpcookie.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">C++ Web Framework
   &#160;<span id="projectnumber">3.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_b2448bd9c6b97c57da490a507d179d6c.html">CPPWebFramework</a></li><li class="navelem"><a class="el" href="dir_3bacee99d34edff13677baafd8c3a47f.html">cwf</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">httpcookie.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> Copyright 2017 Herik Lima de Castro and Marcelo Medeiros Eler</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> Distributed under MIT license, or public domain if desired and</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> recognized in your jurisdiction.</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> See file LICENSE for detail.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef HTTPCOOKIE_H</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define HTTPCOOKIE_H</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;QList&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;QDebug&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;QByteArray&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;cppwebframework_global.h&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;CWF_BEGIN_NAMESPACE</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_http_cookie.html">   20</a></span>&#160;<span class="keyword">class </span>CPPWEBFRAMEWORKSHARED_EXPORT <a class="code" href="class_http_cookie.html">HttpCookie</a></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;{</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    QByteArray name;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    QByteArray value;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    QByteArray comment;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    QByteArray domain;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    QByteArray path;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keywordtype">int</span> maxAge  = 0;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordtype">int</span> version = 1;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="keywordtype">bool</span> secure = <span class="keyword">false</span>;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <a class="code" href="class_http_cookie.html">HttpCookie</a>() = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keyword">explicit</span> <a class="code" href="class_http_cookie.html">HttpCookie</a>(<span class="keyword">const</span> QByteArray &amp;source);</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <a class="code" href="class_http_cookie.html">HttpCookie</a>(<span class="keyword">const</span> QByteArray &amp;name, <span class="keyword">const</span> QByteArray &amp;value);</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    QByteArray toByteArray() <span class="keyword">const</span> ;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keyword">static</span> QList&lt;QByteArray&gt; splitCSV(<span class="keyword">const</span> QByteArray &amp;source);</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="class_http_cookie.html#abf6c25aa3654581007514fb8eb05ce7e">   57</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_http_cookie.html#abf6c25aa3654581007514fb8eb05ce7e">setName</a>(<span class="keyword">const</span> QByteArray &amp;value) noexcept { name = value; }</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="class_http_cookie.html#a7bb2be880561c06f961cda75ed200601">   61</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_http_cookie.html#a7bb2be880561c06f961cda75ed200601">setValue</a>(<span class="keyword">const</span> QByteArray &amp;value) noexcept { this-&gt;value = value; }</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="class_http_cookie.html#a728428f4220ba6678fdbfc225f65ab89">   65</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_http_cookie.html#a728428f4220ba6678fdbfc225f65ab89">setComment</a>(<span class="keyword">const</span> QByteArray &amp;value) noexcept { comment = value; }</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="class_http_cookie.html#a00a6d505032b46606cbe6e573977f686">   69</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_http_cookie.html#a00a6d505032b46606cbe6e573977f686">setDomain</a>(<span class="keyword">const</span> QByteArray &amp;value) noexcept { domain = value; }</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="class_http_cookie.html#a829662d2cc5a445c718217c2651a31ea">   73</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_http_cookie.html#a829662d2cc5a445c718217c2651a31ea">setMaxAge</a>(<span class="keywordtype">int</span> value) noexcept { maxAge = value; }</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="class_http_cookie.html#acdb116a430353e45a95435d8debd5632">   77</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_http_cookie.html#acdb116a430353e45a95435d8debd5632">setPath</a>(<span class="keyword">const</span> QByteArray &amp;value) noexcept { path = value; }</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="class_http_cookie.html#ab1caa7eca962c497e765c46523d4747e">   81</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="class_http_cookie.html#ab1caa7eca962c497e765c46523d4747e">setSecure</a>(<span class="keywordtype">bool</span> value) noexcept { secure = value; }</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="class_http_cookie.html#ad3370987b4bce5447598d1014c0d0f3b">   85</a></span>&#160;    <span class="keyword">inline</span> QByteArray <a class="code" href="class_http_cookie.html#ad3370987b4bce5447598d1014c0d0f3b">getName</a>() const noexcept { <span class="keywordflow">return</span> name; }</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="class_http_cookie.html#accaa975ced5c52bb8d5f4057a6bfa08d">   89</a></span>&#160;    <span class="keyword">inline</span> QByteArray <a class="code" href="class_http_cookie.html#accaa975ced5c52bb8d5f4057a6bfa08d">getValue</a>() const noexcept { <span class="keywordflow">return</span> value; }</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="class_http_cookie.html#a76890b2f2990c4b6eff5ab34957362ab">   93</a></span>&#160;    <span class="keyword">inline</span> QByteArray <a class="code" href="class_http_cookie.html#a76890b2f2990c4b6eff5ab34957362ab">getComment</a>() const noexcept { <span class="keywordflow">return</span> comment; }</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="class_http_cookie.html#ab43fbcb808b4e8984a8ac5568c8c49e4">   97</a></span>&#160;    <span class="keyword">inline</span> QByteArray <a class="code" href="class_http_cookie.html#ab43fbcb808b4e8984a8ac5568c8c49e4">getDomain</a>() const noexcept { <span class="keywordflow">return</span> domain; }</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="class_http_cookie.html#a1389aee86b12fe9e62929caa8799704a">  101</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="class_http_cookie.html#a1389aee86b12fe9e62929caa8799704a">getMaxAge</a>() const noexcept { <span class="keywordflow">return</span> maxAge; }</div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="class_http_cookie.html#aed5277e7667f8b38d1789bab44ee33fc">  105</a></span>&#160;    <span class="keyword">inline</span> QByteArray <a class="code" href="class_http_cookie.html#aed5277e7667f8b38d1789bab44ee33fc">getPath</a>() const noexcept { <span class="keywordflow">return</span> path; }</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="class_http_cookie.html#aba32d79bc73dda77b028f4355c4313ca">  109</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="class_http_cookie.html#aba32d79bc73dda77b028f4355c4313ca">getSecure</a>() const noexcept { <span class="keywordflow">return</span> secure; }</div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="class_http_cookie.html#ad3c11641e67f8c051eecd5d34f2199fd">  113</a></span>&#160;    <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="class_http_cookie.html#ad3c11641e67f8c051eecd5d34f2199fd">getVersion</a>() const noexcept { <span class="keywordflow">return</span> version; }</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;};</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;CWF_END_NAMESPACE</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="preprocessor">#endif // HTTPCOOKIE_H</span></div><div class="ttc" id="class_http_cookie_html_aba32d79bc73dda77b028f4355c4313ca"><div class="ttname"><a href="class_http_cookie.html#aba32d79bc73dda77b028f4355c4313ca">HttpCookie::getSecure</a></div><div class="ttdeci">bool getSecure() const noexcept</div><div class="ttdoc">getSecure </div><div class="ttdef"><b>Definition:</b> httpcookie.h:109</div></div>
<div class="ttc" id="class_http_cookie_html_aed5277e7667f8b38d1789bab44ee33fc"><div class="ttname"><a href="class_http_cookie.html#aed5277e7667f8b38d1789bab44ee33fc">HttpCookie::getPath</a></div><div class="ttdeci">QByteArray getPath() const noexcept</div><div class="ttdoc">getPath </div><div class="ttdef"><b>Definition:</b> httpcookie.h:105</div></div>
<div class="ttc" id="class_http_cookie_html_ad3c11641e67f8c051eecd5d34f2199fd"><div class="ttname"><a href="class_http_cookie.html#ad3c11641e67f8c051eecd5d34f2199fd">HttpCookie::getVersion</a></div><div class="ttdeci">int getVersion() const noexcept</div><div class="ttdoc">getVersion </div><div class="ttdef"><b>Definition:</b> httpcookie.h:113</div></div>
<div class="ttc" id="class_http_cookie_html_a7bb2be880561c06f961cda75ed200601"><div class="ttname"><a href="class_http_cookie.html#a7bb2be880561c06f961cda75ed200601">HttpCookie::setValue</a></div><div class="ttdeci">void setValue(const QByteArray &amp;value) noexcept</div><div class="ttdoc">setValue </div><div class="ttdef"><b>Definition:</b> httpcookie.h:61</div></div>
<div class="ttc" id="class_http_cookie_html_a1389aee86b12fe9e62929caa8799704a"><div class="ttname"><a href="class_http_cookie.html#a1389aee86b12fe9e62929caa8799704a">HttpCookie::getMaxAge</a></div><div class="ttdeci">int getMaxAge() const noexcept</div><div class="ttdoc">getMaxAge </div><div class="ttdef"><b>Definition:</b> httpcookie.h:101</div></div>
<div class="ttc" id="class_http_cookie_html"><div class="ttname"><a href="class_http_cookie.html">HttpCookie</a></div><div class="ttdoc">This class represents a HTTP Cookie. </div><div class="ttdef"><b>Definition:</b> httpcookie.h:20</div></div>
<div class="ttc" id="class_http_cookie_html_a829662d2cc5a445c718217c2651a31ea"><div class="ttname"><a href="class_http_cookie.html#a829662d2cc5a445c718217c2651a31ea">HttpCookie::setMaxAge</a></div><div class="ttdeci">void setMaxAge(int value) noexcept</div><div class="ttdoc">setMaxAge </div><div class="ttdef"><b>Definition:</b> httpcookie.h:73</div></div>
<div class="ttc" id="class_http_cookie_html_ab43fbcb808b4e8984a8ac5568c8c49e4"><div class="ttname"><a href="class_http_cookie.html#ab43fbcb808b4e8984a8ac5568c8c49e4">HttpCookie::getDomain</a></div><div class="ttdeci">QByteArray getDomain() const noexcept</div><div class="ttdoc">getDomain </div><div class="ttdef"><b>Definition:</b> httpcookie.h:97</div></div>
<div class="ttc" id="class_http_cookie_html_a76890b2f2990c4b6eff5ab34957362ab"><div class="ttname"><a href="class_http_cookie.html#a76890b2f2990c4b6eff5ab34957362ab">HttpCookie::getComment</a></div><div class="ttdeci">QByteArray getComment() const noexcept</div><div class="ttdoc">getComment </div><div class="ttdef"><b>Definition:</b> httpcookie.h:93</div></div>
<div class="ttc" id="class_http_cookie_html_accaa975ced5c52bb8d5f4057a6bfa08d"><div class="ttname"><a href="class_http_cookie.html#accaa975ced5c52bb8d5f4057a6bfa08d">HttpCookie::getValue</a></div><div class="ttdeci">QByteArray getValue() const noexcept</div><div class="ttdoc">getValue </div><div class="ttdef"><b>Definition:</b> httpcookie.h:89</div></div>
<div class="ttc" id="class_http_cookie_html_acdb116a430353e45a95435d8debd5632"><div class="ttname"><a href="class_http_cookie.html#acdb116a430353e45a95435d8debd5632">HttpCookie::setPath</a></div><div class="ttdeci">void setPath(const QByteArray &amp;value) noexcept</div><div class="ttdoc">setPath </div><div class="ttdef"><b>Definition:</b> httpcookie.h:77</div></div>
<div class="ttc" id="class_http_cookie_html_abf6c25aa3654581007514fb8eb05ce7e"><div class="ttname"><a href="class_http_cookie.html#abf6c25aa3654581007514fb8eb05ce7e">HttpCookie::setName</a></div><div class="ttdeci">void setName(const QByteArray &amp;value) noexcept</div><div class="ttdoc">setName </div><div class="ttdef"><b>Definition:</b> httpcookie.h:57</div></div>
<div class="ttc" id="class_http_cookie_html_a00a6d505032b46606cbe6e573977f686"><div class="ttname"><a href="class_http_cookie.html#a00a6d505032b46606cbe6e573977f686">HttpCookie::setDomain</a></div><div class="ttdeci">void setDomain(const QByteArray &amp;value) noexcept</div><div class="ttdoc">setDomain </div><div class="ttdef"><b>Definition:</b> httpcookie.h:69</div></div>
<div class="ttc" id="class_http_cookie_html_a728428f4220ba6678fdbfc225f65ab89"><div class="ttname"><a href="class_http_cookie.html#a728428f4220ba6678fdbfc225f65ab89">HttpCookie::setComment</a></div><div class="ttdeci">void setComment(const QByteArray &amp;value) noexcept</div><div class="ttdoc">setComment </div><div class="ttdef"><b>Definition:</b> httpcookie.h:65</div></div>
<div class="ttc" id="class_http_cookie_html_ad3370987b4bce5447598d1014c0d0f3b"><div class="ttname"><a href="class_http_cookie.html#ad3370987b4bce5447598d1014c0d0f3b">HttpCookie::getName</a></div><div class="ttdeci">QByteArray getName() const noexcept</div><div class="ttdoc">getName </div><div class="ttdef"><b>Definition:</b> httpcookie.h:85</div></div>
<div class="ttc" id="class_http_cookie_html_ab1caa7eca962c497e765c46523d4747e"><div class="ttname"><a href="class_http_cookie.html#ab1caa7eca962c497e765c46523d4747e">HttpCookie::setSecure</a></div><div class="ttdeci">void setSecure(bool value) noexcept</div><div class="ttdoc">setSecure </div><div class="ttdef"><b>Definition:</b> httpcookie.h:81</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Apr 8 2018 19:45:38 for C++ Web Framework by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
